package com.springcloud.fegin;

import com.springcloud.entities.CommonResult;
import com.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 71928
 */
@FeignClient(name="CLOUD-PAYMENT-SERVICE")
public interface OrderService {

    @PostMapping("payment/info")
    CommonResult<Payment> getPayment(@RequestBody Payment payment);

    @GetMapping("payment/get/{id}")
    CommonResult<Payment> getPayment(@PathVariable("id") Long id);
}
